Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port all lib.rs code into binary #11

Merged
merged 5 commits into from
Oct 5, 2023
Merged

Port all lib.rs code into binary #11

merged 5 commits into from
Oct 5, 2023

Conversation

zeapoz
Copy link
Member

@zeapoz zeapoz commented Oct 4, 2023

No description provided.

@zeapoz zeapoz requested a review from tuommaki October 4, 2023 14:28
@zeapoz zeapoz self-assigned this Oct 4, 2023
Copy link
Collaborator

@tuommaki tuommaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General direction looks good. Couple question for now.

src/constants.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated
});
let processor = TreeProcessor::new(&db_dir)?;
let (tx, rx) = mpsc::channel::<Vec<CommitBlockInfoV1>>(5);
processor.run(rx);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The returned JoinHandle is not captured nor "awaited" here - how does this work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same behavior that we had before, we're just spawning the task inside this function instead. The thing with tokio futures is that they will start executing as soon as they're spawned, await will just wait until that task is done.

src/processor/tree/mod.rs Outdated Show resolved Hide resolved
src/processor/tree/mod.rs Outdated Show resolved Hide resolved
@zeapoz zeapoz force-pushed the ref/port-state-tree branch from 1c62021 to 21f07d4 Compare October 5, 2023 07:59
Copy link
Collaborator

@tuommaki tuommaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@zeapoz zeapoz merged commit f62e43c into main Oct 5, 2023
4 checks passed
@zeapoz zeapoz deleted the ref/port-state-tree branch October 5, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants